package datastructures;

public class Register {
	
	String name;
	Object data;
	
	public Register(String name){
		
		this.name = name;
		
	}
	
	public Register(String name, Object data){
		
		this.name = name;
		this.data = data;
		
	}
	
	public void setData(Object data){
		
		this.data = data;
		
	}
	
	public Object getData(){
		
		return(this.data);
		
	}
	
	public void clearData(){
		
		this.data = null;
		
	}
	
	public String getName(){
		
		return("R" + name);
		
	}
	
	public String toString(){
		
		return("R" + name + " = " + data);
		
	}

}
